package com.example.kindergarten.generator.kindergarten;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 权限表
 * @TableName kg_auth
 */
@TableName(value ="kg_auth")
public class KgAuth implements Serializable {
    /**
     * 权限id
     */
    @TableId(value = "id")
    private Integer id;

    /**
     * 权限名字
     */
    @TableField(value = "auth_name")
    private String auth_name;

    /**
     * 等级
     */
    @TableField(value = "leave")
    private Integer leave;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date created_at;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updated_at;

    /**
     * 删除时间
     */
    @TableField(value = "deleted_at")
    private Date deleted_at;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 权限id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 权限id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 权限名字
     */
    public String getAuth_name() {
        return auth_name;
    }

    /**
     * 权限名字
     */
    public void setAuth_name(String auth_name) {
        this.auth_name = auth_name;
    }

    /**
     * 等级
     */
    public Integer getLeave() {
        return leave;
    }

    /**
     * 等级
     */
    public void setLeave(Integer leave) {
        this.leave = leave;
    }

    /**
     * 创建时间
     */
    public Date getCreated_at() {
        return created_at;
    }

    /**
     * 创建时间
     */
    public void setCreated_at(Date created_at) {
        this.created_at = created_at;
    }

    /**
     * 更新时间
     */
    public Date getUpdated_at() {
        return updated_at;
    }

    /**
     * 更新时间
     */
    public void setUpdated_at(Date updated_at) {
        this.updated_at = updated_at;
    }

    /**
     * 删除时间
     */
    public Date getDeleted_at() {
        return deleted_at;
    }

    /**
     * 删除时间
     */
    public void setDeleted_at(Date deleted_at) {
        this.deleted_at = deleted_at;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        KgAuth other = (KgAuth) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAuth_name() == null ? other.getAuth_name() == null : this.getAuth_name().equals(other.getAuth_name()))
            && (this.getLeave() == null ? other.getLeave() == null : this.getLeave().equals(other.getLeave()))
            && (this.getCreated_at() == null ? other.getCreated_at() == null : this.getCreated_at().equals(other.getCreated_at()))
            && (this.getUpdated_at() == null ? other.getUpdated_at() == null : this.getUpdated_at().equals(other.getUpdated_at()))
            && (this.getDeleted_at() == null ? other.getDeleted_at() == null : this.getDeleted_at().equals(other.getDeleted_at()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAuth_name() == null) ? 0 : getAuth_name().hashCode());
        result = prime * result + ((getLeave() == null) ? 0 : getLeave().hashCode());
        result = prime * result + ((getCreated_at() == null) ? 0 : getCreated_at().hashCode());
        result = prime * result + ((getUpdated_at() == null) ? 0 : getUpdated_at().hashCode());
        result = prime * result + ((getDeleted_at() == null) ? 0 : getDeleted_at().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", auth_name=").append(auth_name);
        sb.append(", leave=").append(leave);
        sb.append(", created_at=").append(created_at);
        sb.append(", updated_at=").append(updated_at);
        sb.append(", deleted_at=").append(deleted_at);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}